using Framework.UI;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using UnityEngine;

public class UILoader : MonoBehaviour
{
    [SerializeField]
    string packageName = "DefaultPackage";
    [SerializeField]
    string uiName = "Framework.UI.LoginFrame";
    [SerializeField]
    string assetName = string.Empty;
    [SerializeField]
    int frameId = 1;
    [SerializeField]
    UILayer layer = UILayer.Middle;

    private void Awake()
    {
        var type = GetType().Assembly.GetType(uiName);
        UIFrameManager.Instance.OpenFrame(type, frameId,layer, packageName,assetName);
        Object.Destroy(this.gameObject);
    }
}
